#!bin/bash

file=`ls /home/hadoop/tpcds/modifybak/q*.sql`
for i in $file
do
     sqlname=`basename $i`
    #启动spark-sql并执行sql文件
     /opt/beh/core/spark/bin/spark-sql -i /home/hadoop/tpcds/modifybak/$sqlname --master spark://host231:8070 --executor-memory 2g --num-executors 10 > /home/hadoop/tpcds/result/${sqlname}.txt 

done
